<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'HomeController@index');
Route::get('/get-column', 'HomeController@getColumn');
Route::get('/get-list', 'HomeController@getArticleList');
Route::get('/get-comment', 'HomeController@getCommentList');
Route::get('/info', 'HomeController@info');

Auth::routes();

Route::get('/home', 'HomeController@index');


$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function (\Dingo\Api\Routing\Router $api) {

    $api->any('login', 'App\Api\V1\Controllers\UserController@app_login');
    $api->any('register', 'App\Api\V1\Controllers\UserController@register');
    $api->group(['middleware' => ['api.auth']], function (\Dingo\Api\Routing\Router $api) {
        $api->any('add_comment', 'App\Api\V1\Controllers\UserController@addComment');
    });
});